package java8_24.oop.Test_1;

public class Circular {
    private double r;
    static double Pi=3.14;

    public Circular(double r) {
        this.r = r;
    }

    public double air(){
        return Pi*r*r;
    }
    public double zhouchang(){
        return 2*Pi*r;
    }
    public void setR(double r){
        if(r<0){
            this.r=0;
        }else{
            this.r=r;
        }
    }
    public double getR(){
        return r;
    }
}
